<!DOCTYPE html>
<html>

<body>
<style>
    .modal-dialog{
        width:700px!important;
    }
    html, body{background-color:#FFF!important;}
    .modal-body{background-color:#fff;padding:15px;width:100%;}
    .page-header{margin-top:15px!important;}
    .add_button{border-top:1px solid #eee;padding-top:15px;}
    .config_img {
        height:65px;
        margin-top: 15px;
    }
    .images_del{text-align: center}
    .layui-form-pane .layui-form-label{font-size:12px!important;}
    .modal-body{display: inline-block;padding-bottom:0px;}
    .show_multiple{float: left;margin-left:15px;}
    #images_upload{display: inline-block;float: left;padding:0px 10px;}
    .layui-input-block p{line-height:36px;padding-left:15px;}
</style>
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" close="true">
        <span aria-hidden="true">×</span>
    </button>
    <h4 class="modal-title">
        <span class="fa fa-legal"></span>&nbsp;{$detail.title}
    </h4>
</div>
<div class="modal-body">

    <form class="layui-form layui-form-pane form-horizontal" action=""  name="layui-form">
        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="备注" class="layui-textarea" name="remark"></textarea>
            </div>
        </div>

        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">签约状态</label>
            <div class="layui-input-block">
                <input type="radio" name="sign" value="5" title="在谈项目" {if condition="$detail['sign'] eq 5"} checked {/if} lay-filter="sign">
                <input type="radio" name="sign" value="1" title="待签约" {if condition="$detail['sign'] eq 1"} checked {/if}  lay-filter="sign">
                <input type="radio" name="sign" value="2" title="已签约" {if condition="$detail['sign'] eq 2"} checked {/if}  lay-filter="sign">
                <input type="radio" name="sign" value="3" title="已逾期" {if condition="$detail['sign'] eq 3"} checked {/if}  lay-filter="sign">
                <input type="radio" name="sign" value="4" title="暂缓推进" {if condition="$detail['sign'] eq 4"} checked {/if}  lay-filter="sign">
            </div>
        </div>

        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">落地可能性</label>
            <div class="input-group col-xs-4" style="float: left">
                <input type="text" name="adopt" placeholder="落地可能性" class="layui-input" value="{$detail.adopt}">
                <span class="input-group-addon">%</span>
            </div>
        </div>

        <div class="layui-form-item layui-col-md12 is_copy" {if condition="$detail['sign'] neq 2"} style="display: none" {/if} >
            <label class="layui-form-label">是否在重点库同步生成</label>
            <div class="input-group col-xs-4" style="float: left">
                <input type="radio" name="is_copy" value="1" title="是" >
                <input type="radio" name="is_copy" value="0" title="否" >
            </div>
        </div>

        <div class="layui-form-item layui-col-md12 is_copy" {if condition="$detail['sign'] neq 2"} style="display: none" {/if} >
            <label class="layui-form-label">签约时间</label>
            <div class="input-group col-xs-4" style="float: left">
                <input type="text" name="actualsignTime" placeholder="签约时间" class="layui-input time" value="{$detail.actualsignTime}" >
            </div>
        </div>


        <input type="hidden" name="type" value="1">
        <input type="hidden" name="id" value="{$detail.id}">
    </form>

</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default btn-sm" close="true">关闭</button>
    <button type="button" class="btn btn-primary btn-sm" _event="update">保存</button>
</div>

<script>
    layui.use(['form','jquery','layer','laydate','table'], function() {
        var form = layui.form;
        var laydate = layui.laydate;
        form.render();

        //同时绑定多个
        lay('.time').each(function(){
            laydate.render({
                elem: this
                ,trigger: 'click'
                ,type: 'date'
                ,theme: 'molv'
            });
        });

        form.on('radio(sign)', function (data) {
            if( data.elem.checked){　　　　　　//判断当前多选框是选中还是取消选中
                var value = data.value;   //  当前选中的value值
                if(value==2){
                    $(".is_copy").show();
                }else{
                    $(".is_copy").hide();
                }
            }else{

            }
        });

    });

</script>

</body>
</html>